<extend name="Index/index"/>

<block name="content">
    <!--<div class="view-product" style="margin-top: 50px">-->
    <div class="info-center">
        <div class="manage-head">
            <h6 class="padding-left manage-head-con">{{$title}}</h6>
        </div>
        <div class="offcial-table input-table table-margin clearfix">
            <div class="demoTable">
                <a class="layui-btn layui-btn-sm"
                   href="javascript:location.replace(location.href);" title="刷新">
                    <i class="layui-icon" style="line-height:30px">&#x1002;</i></a>
                <form action="{{:U('User/power')}}" method="get" style="margin-top: 20px">
                    权限名称：
                    <div class="layui-inline">
                        <input class="layui-input" name="action"  autocomplete="off">
                    </div>
                    模块:
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <select name="module" lay-search="" class="form-control">
                                <option value="">所有</option>
                                <foreach name="moduleList" item="val">
                                    <option value="{{$val.id}}">{{$val.module}}</option>
                                </foreach>
                            </select>
                        </div>
                    </div>
                    排序：
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <select name="order" lay-search="" class="form-control">
                                <option value="p.id" selected>ID</option>
                                <option value="p.module_id">模块</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <select name="order1" lay-search="" class="form-control">
                                <option value="asc" selected>正序</option>
                                <option value="desc">倒序</option>
                            </select>
                        </div>
                    </div>
                    <input type="submit" value="搜索" class="layui-btn">
                </form>
            </div>

            <if condition="$powerList eq null">
                <div class="tr non-info show border-bottom-none">
                    <span>没查询到符合条件的记录</span>
                </div>
                <else />
                <table class="layui-table text-center">
                    <colgroup>
                        <col width="5%">
                        <col width="15%">
                        <col width="15%">
                        <col width="20%">
                        <col width="20%">
                        <col width="20%">
                    </colgroup>
                    <tr>
                        <th class="text-center">ID</th>
                        <th class="text-center">模块</th>
                        <th class="text-center">操作</th>
                        <th class="text-center">操作url</th>
                        <th class="text-center">修改时间</th>
                        <th class="text-center">创建时间</th>
                    </tr>
                    <foreach  name="powerList" item="vo" key="k">
                        <tr>
                            <td>{{$vo.id}}</td>
                            <td>{{$vo.module}}</td>
                            <td>{{$vo.action}}</td>
                            <td>{{$vo.path}}</td>
                            <td>{{$vo.update_time}}</td>
                            <td>{{$vo.create_time}}</td>
                        </tr>
                    </foreach>
                    <tr>
                        <td colspan="6"><div class="sabrosus">{{$page}}</div></td>
                    </tr>
                </table>

            </if>

        </div>
    </div>

    <!--</div>-->
    <script>
        // function prev(){
        //     window.location.href = document.getElementById('iframepage').previousSrc;
        // }
    </script>
</block>